﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using CRMAdapter.EziDebitService;

namespace CRMWeb.Pages.AM
{
    public partial class AddPaymentEziDebit : CRMWeb.Utilities.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btnAddPayment_Click(object sender, EventArgs e)
        {
            string digitalKey = WebConfigurationManager.AppSettings["EziDebitDigitalKey"].ToString();

            CRMAdapter.PayByEzidebit.AddPayments(digitalKey, txtCustId.Text, "", txtDebitDateP.Text, Convert.ToInt64(txtPayAmtP.Text), txtPayRefP.Text, "");
            ClearAll();
        }



        //Method to clear all fields
        public void ClearAll()
        {
           
            txtCustId.Text = "";
            txtDebitDateP.Text = "";
            txtPayAmtP.Text = "";
            txtPayRefP.Text = "";
        }

        
    }
}